package model;

public enum TechnologyLevel {
	Infantry(0, 20, 0), 
	Automatic_Weapons(1, 50, 3), 
	Rocket_Launchers(3, 80, 11), 
	Tanks(6, 120, 30), 
	Improved_Tanks(12, 150, 55), 
	Fighter_Planes(15, 0, 90);
	
	private final int combatBonus;
	private final int levelCost;
	private final int troopCost;

	private TechnologyLevel(int CombatBonus, int LevelCost, int TroopCost){
		this.combatBonus = CombatBonus;
		this.levelCost = LevelCost;
		this.troopCost = TroopCost;
	}
	
	public int CombatBonus(){return combatBonus;}
	public int LevelCost(){return levelCost;}
	public int TroopCost(){return troopCost;}
	
	public TechnologyLevel Next(){
      switch(this){
      case Infantry: return Automatic_Weapons;
	  case Automatic_Weapons: return Rocket_Launchers;
	  case Rocket_Launchers: return Tanks;
	  case Tanks: return Improved_Tanks;
	  case Improved_Tanks: return Fighter_Planes;
	  default: return null;
      }
	}
	
	public TechnologyLevel Previous(){
	  switch(this){
	    case Automatic_Weapons: return Infantry;
		case Rocket_Launchers: return Automatic_Weapons;
		case Tanks: return Rocket_Launchers;
		case Improved_Tanks: return Tanks;
		case Fighter_Planes: return Improved_Tanks;
		default: return null;
	   }
    }
	
	  
		
}
